<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_personal.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.trade.ts_area.*" %>


  <% 
     String cust_id="",user_id="";	
	if( session.getAttribute("session_cust_id") != null )
	{
		cust_id = session.getAttribute("session_cust_id").toString();
	}
	if( session.getAttribute("session_user_id") != null )
	{
		user_id = session.getAttribute("session_user_id").toString();
	}
	Ts_areaInfo areaBean = new Ts_areaInfo();
  	Ti_personalInfo ti_personalInfo = new Ti_personalInfo();
  	List list = ti_personalInfo.getListByPk(user_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String user_name="",passwd="",state_code="",user_class="",question="",answer="",inter_num="",real_name="",phone="",email="",cellphone="",fax="",qq="",msn="",post_code="",address="",sex="",birth="",area_attr="",marry="",blood_type="",career="",job="",hobby="",income="",last_login="",rsrv_str1="",rsrv_str2="",rsrv_str3="",rsrv_str4="",rsrv_str5="",rsrv_str6="",post_state="",in_date="",pub_user_id="";
  	if(map.get("real_name")!=null) real_name = map.get("real_name").toString();
  	if(map.get("birth")!=null) birth = map.get("birth").toString();
  	if(map.get("sex")!=null) sex = map.get("sex").toString();
  	if(map.get("marry")!=null) marry = map.get("marry").toString();
  	if(map.get("area_attr")!=null) area_attr = map.get("area_attr").toString();
  	if(map.get("post_code")!=null) post_code = map.get("post_code").toString();
  	if(map.get("address")!=null) address = map.get("address").toString();
  	if(map.get("phone")!=null) phone = map.get("phone").toString();
  	if(map.get("email")!=null) email = map.get("email").toString();
  	if(map.get("cellphone")!=null) cellphone = map.get("cellphone").toString();
  	if(map.get("fax")!=null) fax = map.get("fax").toString();
  	if(map.get("qq")!=null) qq = map.get("qq").toString();
  	if(map.get("msn")!=null) msn = map.get("msn").toString();
  	
  	if(map.get("user_name")!=null) user_name = map.get("user_name").toString();
  	if(map.get("passwd")!=null) passwd = map.get("passwd").toString();
  	if(map.get("state_code")!=null) state_code = map.get("state_code").toString();
  	if(map.get("user_class")!=null) user_class = map.get("user_class").toString();
  	if(map.get("question")!=null) question = map.get("question").toString();
  	if(map.get("answer")!=null) answer = map.get("answer").toString();
  	if(map.get("inter_num")!=null) inter_num = map.get("inter_num").toString();
  	if(map.get("blood_type")!=null) blood_type = map.get("blood_type").toString();
  	if(map.get("career")!=null) career = map.get("career").toString();
  	if(map.get("job")!=null) job = map.get("job").toString();
  	if(map.get("hobby")!=null) hobby = map.get("hobby").toString();
  	if(map.get("income")!=null) income = map.get("income").toString();
  	if(map.get("last_login")!=null) last_login = map.get("last_login").toString();
  	if(map.get("post_state")!=null) post_state = map.get("post_state").toString();
  	if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
  	if(map.get("pub_user_id")!=null) pub_user_id = map.get("pub_user_id").toString();

			String areaAttr = "";
			
		if (map.get("area_attr") != null) {
		area_attr = map.get("area_attr").toString();
		String areaArr[] = area_attr.split("\\|");
		for( int k = 0; k < areaArr.length; k++ ){
			areaAttr = areaAttr + " &nbsp; " + areaBean.getAreaNameById( areaArr[k]);
		}
	}
	
  %>
	
	<script language="javascript" type="text/javascript" src="/program/plugins/calendar/WdatePicker.js"></script>
	<script language="javascript" type="text/javascript" src="commen.js"></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ts_areaInfo.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
	<script language="javascript" type="text/javascript" src="js_customer.js"></script>
	
<div class="f-right w750">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#eddfea">
      <tr>
        <td width="5%" height="40" align="center"><img src="/program/member/index/images/icon1.gif" /></td>
        <td width="75%"><h3>用户资料信息维护</h3></td>

      </tr>
    </table>

    <!--Content部分开始-->
    <DIV class="focus-area-setTab">
      <DIV class="focus-area-setTab-menu">
        <DIV class="clear"></DIV>
      </DIV>
      <DIV class="focus-area-setTab-content">
        <DIV id=con_one_1 >
          <table width="100%" border="0" cellspacing="0" bgcolor="#fcf8fb" cellpadding="0" style="border-bottom:3px solid #eddfea; padding-left:15px;">
            <tr bgcolor="#fcf8fb">
              <td height="100" valign="top">
		  	<form action="/doTradeReg.do" name="addForm" method="post">
		  		<input type="hidden" name="user_name" value="<%=user_name %>" />
		  		<input type="hidden" name="passwd" value="<%=passwd %>" />
		  		<input type="hidden" name="state_code" value="<%=state_code %>" />
		  		<input type="hidden" name="user_class" value="<%=user_class %>" />
		  		<input type="hidden" name="question" value="<%=question %>" />
		  		<input type="hidden" name="email" value="<%=email %>" />		<!-- //   fixed by Zhouxq          -->
		  		<input type="hidden" name="answer" value="<%=answer %>" />
		  		<input type="hidden" name="inter_num" value="<%=inter_num %>" />
		  		<input type="hidden" name="blood_type" value="<%=blood_type %>" />
		  		<input type="hidden" name="career" value="<%=career %>" />
		  		<input type="hidden" name="job" value="<%=job %>" />
		  		<input type="hidden" name="hobby" value="<%=hobby %>" />
		  		<input type="hidden" name="income" value="<%=income %>" />
		  		<input type="hidden" name="last_login" value="<%=last_login %>" />
		  		<input type="hidden" name="post_state" value="<%=post_state %>" />
		  		<input type="hidden" name="in_date" value="<%=in_date %>" />
		  		<input type="hidden" name="pub_user_id" value="<%=pub_user_id %>" />
		  		
			  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:12px;">
     
                  <tr>
                    <td  height="38" align="right" width="20%"  class="art_col">真实姓名:</td>
                    <td><input name="real_name" id="real_name" value="<%=real_name %>" type="text" maxlength="50" /></td>
                  </tr>
				  
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">生日:</td>
				  <td><input name="birth" id="birth" value="<%=birth %>" type="text" class="Wdate"  onclick="WdatePicker({readOnly:true})" size="15"  width="150px"/></td>
				  </tr>
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">性别:</td>
				  <td>

				<input type="radio" name="sex" id="sex0" value="0" <%if(sex.equals("0")){%>checked<%}%> />男 &nbsp;
				<input type="radio" name="sex" id="sex1" value="1" <%if(sex.equals("1")){%>checked<%}%>  />女	  
				  </td>
				  </tr>		
				  
				  <tr>
				  <td  height="38" align="right" width="20%"  class="art_col">婚姻状况:</td>
				  <td>
				<input type="radio" name="marry" id="marry0" value="0" <%if(marry.equals("0")){%>checked<%}%> />未婚 &nbsp;
				<input type="radio" name="marry" id="marry1" value="1" <%if(marry.equals("1")){%>checked<%}%>  />已婚	  
				  </td>
				  </tr>						  
				  
		
			
			<!--//     fixed by Zhouxq           -->
			
		<tr>					
					<td  height="38" align="right" width="20%"  class="art_col">所在地区</td>
			<td colspan="3">
				<div id="org1">
					<font color="#CECECE"><span id="areaoutput"><%=areaAttr%></span></font>
					<input type="button" name="buttons" value="选择地区" class="button2" onclick="ChangeOrg()" />
				</div>
				<div style="display:none;float:left" id="org2">
					<select name="province" id="province" onclick="setCitys(this.value)">
					  <option value="">省份</option> 
					</select>
					<select name="eparchy_code" id="eparchy_code" onclick="setAreas(this.value)">
					  <option value="">地级市</option> 
					 </select>
					<select name="city_code" id="city_code" style="display:inline" >
					 <option value="">市、县级市、县</option> 
					</select>
				</div>
					<input type="hidden" name="area_attr_bak" id="area_attr_bak" value="<%=area_attr %>" />
					<input type="hidden" name="area_attr" id="area_attr" value="<%=area_attr %>" />
				</td>
			</tr>
              
				 
				 </td>
				  </tr>
                  <tr>
                    <td height="38" align="right"  class="art_col">邮政编码:</td>
					<td><input name="post_code" id="post_code" value="<%=post_code %>" type="text"  onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''" maxlength="9" /></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">家庭住址:</td>
					<td><input name="address" id="address" value="<%=address %>" type="text" size="50"/></td>
                  </tr>	
				  				  				  
                  <tr >
                    <td height="38" align="right"  class="art_col">手机号码:</td>
					<td><input name="cellphone" id="cellphone" value="<%=cellphone %>" type="text" maxlength="50"/></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">固定电话:</td>
					<td><input name="phone" id="phone" value="<%=phone %>" type="text" maxlength="50" /></td>
                  </tr>
				  
                   <tr>
                    <td height="38" align="right"  class="art_col">传真:</td>
					<td><input name="fax" id="fax" value="<%=fax %>" type="text" /></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">QQ:</td>
					<td><input name="qq" id="qq" value="<%=qq %>" type="text" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''" /></td>
                  </tr>
				  
                  <tr>
                    <td height="38" align="right"  class="art_col">MSN:</td>
					<td><input name="msn" id="msn" value="<%=msn %>" type="text" /></td>
                  </tr>
				  <input type="hidden" name="bpm_id" value="2960" />
	  			<input type="hidden" name="user_id" value="<%=user_id %>" />

                </table>
				</form>
				</td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" >
            <tr>
              <td height="50" align="center">

			  <input type="button" name="Submit2" value="确定" class="button2" onclick="return submitForm();">
              </td>
            </tr>
          </table>
        </DIV>
      
      </DIV>
    </DIV>
  </div>
</div>